Creating a personalized query link on the Customers tab
An iMIS Server .NET administrator can create a custom IQA query for searching customer records and configure a personalized link to the query in the navigation menu of the Customers module in each iMIS user's client.
Before you begin
A iMIS Server .NET administrator must perform this task because they must have sufficient authority to view the IFC tab and to create, edit, and delete queries in the Central Object Repository.
To create a personalized query link on the Customers tab
- Define your personalized query.
- Create or edit a query that returns records from the CsContacts business object.
- Select the Display tab.
- From the Mode drop-down list, choose Advanced. A new Alias column appears.
- In the row that corresponds to the customer ID for the query, enter key_contact.
- Test and save the query.
Note: Do not use single-quote (apostrophe) or double-quote characters in the query name.
- Temporarily reconfigure iMIS Server .NET windows to display a browser context menu.
- On your iMIS Server .NET host, open the web.config file. (The default location is C:\Program Files\IMIS.NET\web.config.)
- Scroll down to the <SystemParams> section and locate the following line:
<add key="Browser.DisableContextMenu" value="true" />
- Change the value from true to false.
- Save the web.config file.
Note: You do not need to restart iMIS Server .NET for this change to take effect.
- Add a link to your personalized query in your iMIS client's LeftCust-Main.htm file.
- On your local computer, make a safe copy of the LeftCust-Main.htm file. (The default location is C:\Program Files\iMIS10\framework\HiRes\Customers.)
- Open the LeftCust-Main.htm file in a simple text editor such as Windows Notepad.
- In the <body> section of the file, locate the following table row:
<tr id="asinetAdvFindlink_menu"
- After the end tag for that table row, enter the following HTML code:
<!-- Custom IQA Link Start -->
<a href="QUERYURL&EmbeddedMode=true" target="imismain">
<tr onmouseout="unframe('asinetQUERYNAME');"
onmouseover="frame('asinetQUERYNAME');">
<td id="asinetQUERYNAME"
style="display:none"
class="navlinkleft"
onclick="SetTask('QUERYNAME');
LeftActivate('asinetQUERYNAME','navlinkleft');">
QUERYNAME
</td>
</tr>
</a>
<!-- Custom IQA Link Stop -->
- In iMIS, from the IFC module, run your personalized query.
The query appears in a Query Results window.
Note: You must run the query from the IFC module. Do not run the query from any other location.
- Right-click inside the Query Results window and choose Properties.
The Properties window appears.
- Right-click the Address (URL) value and choose Select All, then right-click the highlighted text and choose Copy.
Note: You must copy the entire URL, which spans many lines. Ensure that you use Select All or else manually click and drag down to ensure that you have selected the entire URL.
- Close the Properties window.
- In the section that you added to the LeftCust-Main.htm file, replace the string QUERYURL with the copied URL.
- Replace all six instances of the string QUERYNAME with the exact spelling of your personalized query name, including capital letters and spaces.
For example, if your personalized query is named "My Find", the section that you added to the LeftCust-Main.htm file would look similar to the following sample:
<!-- Custom IQA Link Start -->
<a href="http://myimisservernethost/imis/iMIS/QueryBuilder/Execute.aspx?iSession=9219c7d3500d4ab285adc0128479f4ef&iUniformKey=07e0345a-1d98-4530-8267-0379ee07a43f&iDocumentPath=$&iCurrentNodeKey=4b0030ed-724e-4bad-a27a-0377d38c7d9d&EmbeddedMode=true" target="imismain">
<tr onmouseout="unframe('asinetMy Find');"
onmouseover="frame('asinetMy Find');">
<td id="asinetMy Find"
style="display:none"
class="navlinkleft"
onclick="SetTask('My Find');
LeftActivate('asinetMy Find','navlinkleft');">
My Find
</td>
</tr>
</a>
<!-- Custom IQA Link Stop -->
- Specify the iMIS authorization level needed to view the personalized query link.
- In the LeftCust-Main.htm file, locate the <script> section that defines the ProcessSecurity() function.
- Locate the IF branch for authorization level 1 (lSecurityLevel >= 1).
- Add the following line at the end of the first level of document.all inclusions:
document.all("asinetQUERYNAME").style.display="inline";
- Replace the string QUERYNAME with the exact spelling of your personalized query name, including capital letters and spaces.
For example, if your personalized query is named "My Find", the full code for the IF branch for authorization level 1 would look like this:
if (lSecurityLevel >= 1)
{
document.all("asimanagecust").style.display="inline";
document.all("asimanagecomm").style.display="inline";
document.all("asiactivity").style.display="inline";
document.all("asinetMy Find").style.display="inline";
if (lLicChapter == true)
{
document.all("asichapters").style.display="inline";
}
}
- Save and close the LeftCust-Main.htm file.
Note:
- You do not need to restart your iMIS client for this change to take effect.
- The personalized link created by this procedure will be visible in this iMIS client to all users with an authorization level of 1 for the Customers module. You can require a different authorization level for the personalized link by adding the document.all line in a different IF branch than the one specified in these instructions.
- Refresh the Customers tab and test the personalized query link.
- In iMIS, cick the Customers tab to refresh the links in the task list.
- Ensure that you can see the new link to your personalized query in the task list.
- Test the link to ensure that it properly launches the query.
- Ensure than the Id column of the query results successfully opens the linked customer profile when you click an ID number.
- Reconfigure iMIS Server .NET windows to prevent the display of a browser context menu.
- On your iMIS Server .NET host, open the web.config file. (The default location is C:\Program Files\IMIS.NET\web.config.)
- Scroll down to the <SystemParams> section and locate the following line:
<add key="Browser.DisableContextMenu" value="false" />
- Change the value from false to true.
- Save the web.config file.
Note: You do not need to restart iMIS Server .NET for this change to take effect.